package cn.it.ygh.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.it.ygh.mapper.AgentManageMapper;
import cn.it.ygh.pojo.Agent;
import cn.it.ygh.pojo.User;
import cn.it.ygh.service.AgentManageService;

@Service("agentManageService")
public class AgentManageServiceImpl implements AgentManageService{

	@Resource
	private AgentManageMapper agentManageMapper;
	
	@Override
	public List<Agent> getAllAgent() {
		// TODO Auto-generated method stub
		return agentManageMapper.getAllAgent();
	}

	@Override
	public Agent getAgentById(int agentId) {
		// TODO Auto-generated method stub
		return agentManageMapper.getAgentById(agentId);
	}

	@Override
	public void addAgent(Agent agent) {
		// TODO Auto-generated method stub
		agentManageMapper.addAgent(agent);
	}

	@Override
	public void modifyAgent(Agent agent) {
		// TODO Auto-generated method stub
		agentManageMapper.modifyAgent(agent);
	}

	@Override
	public void deleteAgent(int agentId) {
		// TODO Auto-generated method stub
		agentManageMapper.deleteAgent(agentId);
	}

	@Override
	public void batchdeleteAgent(int[] agentIds) {
		// TODO Auto-generated method stub
		agentManageMapper.batchdeleteAgent(agentIds);
	}

	@Override
	public List<Agent> findAgent(String key) {
		// TODO Auto-generated method stub
		return agentManageMapper.findAgent(key);
	}

	@Override
	public List<Agent> getPageData(int pageStart, int pageSize, String key) {
		// TODO Auto-generated method stub
		return agentManageMapper.getPageData(pageStart, pageSize, key);
	}

	@Override
	public int getTotalRecord(String key) {
		// TODO Auto-generated method stub
		return agentManageMapper.getTotalRecord(key);
	}

}
